Page({
  onShareAppMessage() {
    return {
      title: 'selection',
      path: 'packageComponent/pages/form/button/button'
    }
  },

  data: {
    schema: [{
      label:'大小',
      prop:'size',
      type:'picker',
      labelOptions:['默认大小','小尺寸'],
      valueOptions:['default','mini']
    },{
      label:'类型',
      prop:'type',
      type:'picker',
      labelOptions:['绿色','白色','红色'],
      valueOptions:['primary','default','warn']
    },{
      label:'是否镂空',
      prop:'plain',
      type:'switch'
    },{
      label:'是否禁用',
      prop:'disabled',
      type:'switch'
    },{
      label:'是否带 loading',
      prop:'loading',
      type:'switch'
    }],
    formData: {
      size:'default',
      type:'default',
      plain:false,
      disabled:false,
      loading:false
    },
    title: '',
    result: '',
    zh:'',
    apiType: '',
    remark: '',
    webUrl: '',
    apiName: '',
  },
  onLoad(options) {
    this.setData({
      apiType: options.zh,
      title: options.title,
      zh: options.zh,
      remark: options.remark,
      webUrl: options.webUrl
    })
  },
  getFormData(e){
    this.setData({
      formData:e.detail.formData
    })
  },
  handler(){
    let a = wx.canIUse('openEmbeddedMiniProgram')
    this.setData({
      result:a
    })
  }
})
